package id.co.rho.scoring.cid.client.command.impl;

import id.co.rho.scoring.cid.changecontrol.entitychange.EntityChange;
import id.co.rho.scoring.cid.client.command.CommandAction;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: bungrudi
 * Date: 8/9/11
 * Time: 8:54 AM
 */
public class SaveChangesCommand implements CommandAction<FetchOneChangeTxResult> {
    private Long proposerUserId;
    /**
     * If this one is set, then it means update.
     * If not, then its new.
     */
    private Long changeTransactionId;
    private List<EntityChange> changes;

    private SaveChangesCommand() {
    }

    public SaveChangesCommand(Long changeTransactionId, List<EntityChange> changes) {
        this.changeTransactionId = changeTransactionId;
        this.changes = changes;
    }

    public SaveChangesCommand(List/*<EntityChange>*/ changes,Long proposerUserId) {
        this.proposerUserId = proposerUserId;
        this.changes = changes;
    }

    public Long getChangeTransactionId() {
        return changeTransactionId;
    }

    public Long getProposerUserId() {
        return proposerUserId;
    }

    public List<EntityChange> getChanges() {
        return changes;
    }
}
